package com.example.logindemo.demo.service.impl;

import com.example.logindemo.demo.bean.Book;
import com.example.logindemo.demo.mapper.BookMapper;
import com.example.logindemo.demo.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookServiceImpl implements BookService {

    @Autowired
    BookMapper bookMapper;

    public Book getBookById(Long id){
        return bookMapper.getBook(id);
    }

    public Book inserBook(Book book){
        return bookMapper.inserBook(book);
    }
}